home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Sample Code / DTS QT Utilities.May-95 / Projects & Test Apps / DigitizerShell / Mac Framework / MacMain.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-30  |  1.5 KB  |  68 lines  |  [TEXT/MPCC]

  1. /*
  2.     File:        MovieShell.c
  3.  
  4.     Contains:    Simple test shell for testing Digitizers.
  5.  
  6.     Written by:    DTS
  7.  
  8.     Copyright:    © 1994-1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.        <1>         4/25/95    khs        first file
  13.        
  14. */
  15.  
  16.  
  17. // INCLUDES
  18. #include <stdio.h>
  19.  
  20. #ifdef __MWERKS__
  21. #include <sioux.h>
  22. #endif // __MWERKS__
  23.  
  24. #include "DTSQTUtilities.h"
  25. #include "MacFramework.h"
  26.  
  27.  
  28. // MAIN
  29. // ______________________________________________________________________
  30. void main(void)
  31. {
  32.     OSErr anErr = noErr;
  33.  
  34. // This is for controlling the sioux window under Metrowerks (5.0 forward)
  35. #ifdef USESIOUX    
  36.     SIOUXSettings.initializeTB = false;
  37.     SIOUXSettings.setupmenus = false;
  38. #endif // USESIOUX    
  39.  
  40.     InitStack(10*1024L);                        // Add 10k more to the stack, for possible QD and Sound Manager needs
  41.     InitMacEnvironment(10L);                    // 10 * MoreMasters
  42.     InitMenubar();
  43.     
  44.     if( !QTUIsQuickTimeInstalled() )
  45.     {
  46.         ShowWarning("\pQuickTime is not installed on this system -- we will exit!", 0);
  47.         ExitToShell();
  48.     }
  49. #if powerc    
  50.     if( !QTUIsQuickTimeCFMInstalled() )
  51.     {
  52.         ShowWarning("\pThe QuickTime PowerPlug file is not available -- we will exit!", 0);
  53.         ExitToShell();                                // I could disable features as well.
  54.     }
  55. #endif // powerc
  56.  
  57.     anErr = EnterMovies(); DebugAssert(anErr == noErr);
  58.     if(anErr != noErr)
  59.     {
  60.         ShowWarning("\pWe have problems initializing the QuickTime environment (exit): ", anErr);
  61.         ExitToShell();
  62.     }
  63.  
  64.     printf("Digitizer Shell -- for testing of Quicktime Digitizer functionality.\n");
  65.  
  66.     MainEventLoop();
  67. }
  68.